function ajaxRequest(method, location, callback, formData)
{
	var xmlhttp = new XMLHttpRequest();
	var timeout;
	
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			callback(xmlhttp);
		}
		else if (xmlhttp.readyState == 1)
			timeout = null;//setTimeout(function() { callback(xmlhttp, true) }, 10000);
	}
	
	xmlhttp.open(method, location, true);
	
	if (method == "POST" && formData)
	{
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", formData.length);
		xmlhttp.setRequestHeader("Connection", "close");
	
		xmlhttp.send(formData);
	}
	else
		xmlhttp.send();
}